﻿/*******************************
fileName；loadmvbportcache.h
date:2024-12-02
author:bang
describe:从EXCel加载MVB 协议逻辑
*******************************/
#ifndef LOADMVBPORTCACHE_H
#define LOADMVBPORTCACHE_H

#include "Tool/qxlsxhelpbase.h"
#include "dataCache/mvbprotocalcache.h"
#include "dataCache/mvbportdata.h"

class LoadMVBPortCache: public qxlsxHelpBase
{
    enum portCacheReadIndex
    {
        SenderEquipment=1,
        ReceiverEquipment,
        PortAddress,
        Size,
        CycleTime,
        PortType

    };

    enum signalsReadIndex
    {
        signal_PortAddress=1,
        ByteIndex,
        BitIndex,
        bitSize,
        MVBType,
        VarName
    };


public:
    LoadMVBPortCache();
    bool LoadMVBPort(const QString& fileName,MVBProtocalCache& protocalCache);
    void LoadMVBVars();

    //要读取的表名
    const QString m_portSheetName  ="Ports";
    const QString m_SignalSheetName  ="Signals";

};

#endif // LOADMVBPORTCACHE_H
